import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'root',
      redirect:'/login',
    },
    {
      path: '/home',
      name: 'home',
      component: resolve => require(['@/pages/home'], resolve),
      children:[
        {
          path: '/dataAnalysis',
          name: 'dataAnalysis',
          component: resolve => require(['@/pages/dataAnalysis'], resolve),
        },
        {
          path: '/heimage',
          name: 'heimage',
          component: resolve => require(['@/pages/heimage'], resolve),
        },
        {
          path: '/longshortComment',
          name: 'longshortComment',
          component: resolve => require(['@/pages/longshortComment'], resolve),
        },
        {
          path: '/weekhourComment',
          name: 'weekhourComment',
          component: resolve => require(['@/pages/weekhourComment'], resolve),
        },
        {
          path: '/wordCloud',
          name: 'wordCloud',
          component: resolve => require(['@/pages/wordCloud'], resolve),
        },
        {
          path: '/userComment',
          name: 'userComment',
          component: resolve => require(['@/pages/userComment'], resolve),
        },
        {
          path: '/userComment1',
          name: 'userComment1',
          component: resolve => require(['@/pages/userComment1'], resolve),
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['@/pages/login'], resolve),
    },
  ]
})
